home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Acao
/
BlueCustom.swf
/
scripts
/
frame_630
/
PlaceObject2_319_162
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-09-25
|
1KB
|
46 lines
onClipEvent(enterFrame){
this._x += _global.xgo;
this._y += _global.ygo;
if(this._y > _root.player._y - 500)
{
yit = Math.floor(Math.random() * 371) + 30;
if(this._x < -200)
{
this._x = 900;
this._y = _root.depth._y - 600 - yit;
die = 1;
this.gotoAndStop(1);
}
if(this._x > 1000)
{
this._x = -100;
this._y = _root.depth._y - 600 - yit;
die = 1;
this.gotoAndStop(1);
}
if(die == 1)
{
myRadians = Math.atan2(this._y - _root.player._y,this._x - _root.player._x);
xleg = this._x - _root.player._x;
yleg = this._y - _root.player._y;
scared = Math.sqrt(xleg * xleg + yleg * yleg);
if(scared < 50)
{
this._y -= 1;
}
this._x -= 4;
}
if(_root.player.eat.hitTest(this.eat))
{
die = 0;
this.gotoAndPlay("die");
scoreity = 200;
_root.tools.instascore.text = "+" + scoreity;
_root.tools.instblock._alpha = 0;
_global.scoreit = _global.scoreit * 1 + scoreity;
_global.boost += scoreity / 30;
_root.tools.bar1.gotoAndStop(_global.boost + 1);
}
}
}